package cn.akwangl.design.pattern.behavioral.strategy.v1;

/**
 * 环境上下文,策略模式的引用.
 *
 * @author youyongkun
 * @date 2021/12/6 21:56
 */
public class Context {
    private Strategy strategy;

    public Strategy getStrategy() {
        return strategy;
    }

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    public void strategyMethod() {
        strategy.strategyMethod();
    }
}
